import time

from pynput.keyboard import Controller, Key
keyboard =Controller()

time.sleep(5)

for i in range(100):
    keyboard.press(Key.up)
    keyboard.release(Key.up)
    keyboard.press(Key.enter)
    keyboard.release(Key.enter)
    time.sleep(13)